class library: Volume - use ServerBoot to send synthdef
[supercollider.git] / platform / iphone / iPhone Resources / patches / accelerometer.rtf
blobbc927cc2ea7f3ab8232a0f515233d5c0038a157f
1 {\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf460
2 {\fonttbl\f0\fnil\fcharset0 Monaco;}
3 {\colortbl;\red255\green255\blue255;\red0\green0\blue191;\red0\green0\blue0;\red191\green0\blue0;
4 \red0\green115\blue0;}
5 \deftab720
6 \pard\pardeftab720\ql\qnatural
8 \f0\fs18 \cf2 Server\cf3 .default = \cf2 Server\cf3 .internal;\
9 s = \cf2 Server\cf3 .internal;\
10 \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural\pardirnatural
11 \cf4 //s.options.blockSize = 64;\cf3 \
12 \pard\pardeftab720\ql\qnatural
13 \cf3 s.waitForBoot(\
14 \{\
15 \pard\pardeftab560\ql\qnatural
16 \cf3    z =\
17         \{\
18                 \cf2 var\cf3  lag = 0.1;\
19                 \cf2 var\cf3  o = \cf2 LFSaw\cf3 .ar([\cf2 AccelerometerX\cf3 .kr(50.midicps, 54.midicps, \cf5 \\exponential\cf3 , lag)+\cf2 SinOsc\cf3 .ar(5), \cf2 AccelerometerY\cf3 .kr(50.midicps, 54.midicps, \cf5 \\exponential\cf3 , lag)+\cf2 SinOsc\cf3 .ar(4.6)], 0, 0.6);\
20                 \cf2 var\cf3  f = \cf2 RLPF\cf3 .ar(o, \cf2 AccelerometerZ\cf3 .kr(80, 4000, \cf5 \\exponential\cf3 ), lag);\
21                 \cf2 Out\cf3 .ar(0, \cf2 FreeVerb\cf3 .ar(f, 0.6, 0.7, 0.2));\
22         \}.play;\
23 \});}